package cn.cqie.attendance.common.service.impl;

import cn.cqie.attendance.common.dao.SelectMapper;
import cn.cqie.attendance.common.pojo.Select;
import cn.cqie.attendance.common.service.SelectService;
import cn.cqie.attendance.common.util.LocalJwt;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Service
public class SelectServiceImpl extends ServiceImpl<SelectMapper, Select> implements SelectService {

    @Autowired
    private SelectMapper selectMapper;

    @Override
    public List<Select> queryAllCollege() {
        return selectMapper.queryAllCollege();
    }

    @Override
    public List<Select> queryAllMajor() {
        return selectMapper.queryAllMajor();
    }

    @Override
    public List<Select> queryAllGroup() {
        return selectMapper.queryAllGroup();
    }

    @Override
    public List<Select> queryAllCourseStatus() {
       return selectMapper.queryAllCourseStatus();
    }

    @Override
    public List<Select> queryAllClass() {
        return selectMapper.queryAllClass();
    }

    @Override
    public List<Select> queryAllApprover() {
        return selectMapper.queryAllApprover();
    }

    @Override
    public List<Select> queryAllCourse() {
        return selectMapper.queryAllCourse();
    }

    @Override
    public List<Select> queryAllTrainTeacher() {
        return selectMapper.queryAllTrainTeacher();
    }

    @Override
    public List<Select> queryAllGrade() {
        return selectMapper.queryAllGrade();
    }

    @Override
    public List<Select> queryCourseByTeacher(HttpServletRequest request) {
        return selectMapper.queryCourseByTeacher(LocalJwt.getCurrentUserId(request));
    }

    @Override
    public List<Select> queryGroupByTeacher(HttpServletRequest request) {
        return selectMapper.queryGroupByTeacher(LocalJwt.getCurrentUserId(request));
    }

    @Override
    public List<Select> queryAllResponseTeacher() {
        return selectMapper.queryAllResponseTeacher();
    }
}
